package com.sline.file;

import java.io.File;

public class Demo1_File {
    public static void main(String[] args) {
        demo1();

        demo2();

        File parent = new File("/Users/luchengdong/Desktop/");
        String child = "2017-12-01.numbers";
        File file = new File(parent, child);
        System.out.println(file.exists());
    }

    private static void demo2() {
        String parent = "/Users/luchengdong/Desktop/";
        String child = "2017-12-01.numbers";
        File file = new File(parent, child);
        System.out.println(file.exists());
    }

    private static void demo1() {
        File file = new File("/Users/luchengdong/Desktop/2017-12-01.numbers");
        System.out.println(file.exists());

        File file1 = new File("abc.txt");
        System.out.println(file1.exists());

        File file2 = new File("abcd.txt");
        System.out.println(file2.exists());
    }
}
